package com.lm.boot;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

/**
 * 我们需要类似于web.xml 的配置方式来启动spring上下文
 * 修改启动类，继承SpringBootServletInitializer 并重写 configure方法
 */
public class SpringBootStartApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {

        return builder.sources(BootApplication.class);
    }
}
